﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace WindowsFormsApplication1
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string connectS = @"Server= " + txtIP.Text + @"\SQLEXPRESS ; Database = testSkill_data; User ID = truongnln; Password = 123456";
            label1.Text = connectS;
            try
            {
                SqlConnection con = new SqlConnection(connectS);
                con.Open();
                con.Close();
                radioButton1.Checked =true;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                radioButton1.Checked = false;
            }
        }
    }
}
